package wjl.awesome.virus.exception;

import lombok.extern.log4j.Log4j2;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * MyExceptionHandler
 *
 * @blame Android Team
 */

@ControllerAdvice
@Log4j2
public class MyExceptionHandler {

    @ExceptionHandler(value =Exception.class)
    public String exceptionHandler(Exception e){
        log.info(e.getMessage());
        return "error";
    }
}